{include file='../public_btn.html'}
<div class="html-box">
    <form target="iframeNewsTarget" method="post" action="/manage/category/edit" enctype="multipart/form-data">
    <input type="hidden" name="id" value="{$row.id}" />

    <table class="table-list">
    <tbody>

        <tr>
            <td class="td-label"><label>所属模型：</label></td>
            <td class="td-input">
                {$module_list}
            </td>
        </tr>

        <tr>
            <td class="td-label"><label>上级栏目：</label></td>
            <td class="td-input">
                <select name="post[parentid]">
                    <option value="0">一级栏目</option>
                    {$select_categorys}
                </select>
            </td>
        </tr>

        <tr>
            <td class="td-label"><label>栏目名称：</label></td>
            <td class="td-input">
                {if $row.id}
                <input type="text" class="form-i w200" name="post[catname]" value="{$row.catname}" />
                {else}
                <textarea name="post[catname]" style="height:90px;"></textarea>
                <div class="form-tip">批量添加栏目，一行代表一个</div>
                {/if}
            </td>
        </tr>

        <tr class="h s0">
            <td class="td-label"><label>外链地址：</label></td>
            <td class="td-input">
                <input type="text" class="form-i w300" name="post[url]" value="{$row.url}" />
                <input type="hidden" id="type" name="post[type]" value="0" />
            </td>
        </tr>

        <tr>
            <td class="td-label"><label>栏目图片：</label></td>
            <td class="td-input">
                {$row.html_thumb}
            </td>
        </tr>

        {if $row.id}
        <tr class="table-h3 s h0">
            <td colspan="2">
                <label><input type="checkbox" name="chage_all" value="1" /> 将以下设置应用到所有子级栏目</label>
                <label>（<input type="checkbox" name="chage_all_mod" value="1" /> 包含所属模型）</label>
            </td>
        </tr>
        {/if}

        <tr class="s h0 h1">
            <td class="td-label"><label>分页条数：</label></td>
            <td class="td-input">
                <input type="text" class="form-i w30" name="post[pagesize]" value="{$row.pagesize}" />
                <span class="form-tip">为空或为0时，默认为系统设置的值</span>
            </td>
        </tr>

        <tr class="s h0">
            <td class="td-label"><label>列表页模板：</label></td>
            <td class="td-input">
                <div id="template_list" style="float: left;margin-right:5px;"></div>
                <label id="listtype0"><input type="radio" class="listtype" name="post[listtype]" value="0"{if !$row.listtype} checked{/if} onclick="category.templatetype(0)" /> 列表页 </label>
                <label id="listtype1"><input type="radio" class="listtype" name="post[listtype]" value="1"{if $row.listtype==1} checked{/if} onclick="category.templatetype(1)" /> 封面页 </label>
                <label id="listtype2"><input type="radio" class="listtype" name="post[listtype]" value="2"{if $row.listtype==2} checked{/if} onclick="category.templatetype(2)" /> 表单页 </label>
            </td>
        </tr>

        <tr class="s h0 h1">
            <td class="td-label"><label>详情页模板：</label></td>
            <td class="td-input">
                <div id="template_show"></div>
            </td>
        </tr>

        <tr>
            <td class="td-label"><label>导航显示：</label></td>
            <td class="td-input">
                <label><input type="radio" name="post[ismenu]" value="1"{if $row.ismenu==1} checked{/if} /> 是</label>
                <label><input type="radio" name="post[ismenu]" value="0"{if !$row.ismenu} checked{/if} /> 否</label>
            </td>
        </tr>

        <tr class="table-h3 s h0">
            <td colspan="2">SEO设置</td>
        </tr>

        <tr class="s h0">
            <td class="td-label"><label>SEO标题：</label></td>
            <td class="td-input">
                <input type="text" class="form-i w200" name="post[title]" value="{$row.title}" />
            </td>
        </tr>

        <tr class="s h0">
            <td class="td-label"><label>SEO关键词：</label></td>
            <td class="td-input">
                <input type="text" class="form-i w200" name="post[keywords]" value="{$row.keywords}" />
            </td>
        </tr>

        <tr class="s h0">
            <td class="td-label"><label>SEO描述：</label></td>
            <td class="td-input">
                <textarea name="post[description]">{$row.description}</textarea>
            </td>
        </tr>

        <tr class="tr-btn">
            <td class="td-label"></td>
            <td class="td-input">
                <button type="submit" name="Submit" class="uiBtn BtnGreen">提&nbsp;&nbsp;交</button>
                <button type="reset" class="uiBtn">重&nbsp;&nbsp;置</button>
            </td>
        </tr>

    </tbody>
    </table>

    </form>
</div>

<script type="text/javascript">
var template_list = "{$row['template_list']}";
var template_show = "{$row['template_show']}";
var list_type = {$row['listtype']};

$.loadJs('/admin/js/manage/category.js',function(){
    category.chang_module($('#moduleid').val(),list_type);
});
</script>